package com.jiuqi.irs.generator.form;

import java.text.SimpleDateFormat;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for tbCancelTask.
 * 
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 * 
 * @struts.form name="TbCancelTaskForm"
 */
public class TbCancelTaskForm extends ActionForm {

	private final static SimpleDateFormat FORMAT = new SimpleDateFormat(
			"dd.MM.yyyy hh:mm:ss");

	private java.lang.String canceltaskGuid = null;

	private java.lang.String canceltaskName = null;

	private java.lang.String canceltaskState = null;

	private java.lang.String canceltaskYear = null;

	private java.lang.String canceltaskStarttime = null;

	private java.lang.String canceltaskEndtime = null;

	private java.lang.String handlePerson = null;

	private java.lang.String reserved1 = null;

	private java.lang.String reserved2 = null;

	private java.lang.String reserved3 = null;

	/**
	 * Standard constructor.
	 */
	public TbCancelTaskForm() {

	}

	public java.lang.String getCanceltaskGuid() {
		return canceltaskGuid;
	}

	public void setCanceltaskGuid(java.lang.String canceltaskGuid) {
		this.canceltaskGuid = canceltaskGuid;
	}

	public java.lang.String getCanceltaskName() {
		return canceltaskName;
	}

	public void setCanceltaskName(java.lang.String canceltaskName) {
		this.canceltaskName = canceltaskName;
	}

	public java.lang.String getCanceltaskState() {
		return canceltaskState;
	}

	public void setCanceltaskState(java.lang.String canceltaskState) {
		this.canceltaskState = canceltaskState;
	}

	public java.lang.String getCanceltaskYear() {
		return canceltaskYear;
	}

	public void setCanceltaskYear(java.lang.String canceltaskYear) {
		this.canceltaskYear = canceltaskYear;
	}

	public java.lang.String getCanceltaskStarttime() {
		return canceltaskStarttime;
	}

	public void setCanceltaskStarttime(java.lang.String canceltaskStarttime) {
		this.canceltaskStarttime = canceltaskStarttime;
	}

	public java.lang.String getCanceltaskEndtime() {
		return canceltaskEndtime;
	}

	public void setCanceltaskEndtime(java.lang.String canceltaskEndtime) {
		this.canceltaskEndtime = canceltaskEndtime;
	}

	public java.lang.String getHandlePerson() {
		return handlePerson;
	}

	public void setHandlePerson(java.lang.String handlePerson) {
		this.handlePerson = handlePerson;
	}

	public static SimpleDateFormat getFORMAT() {
		return FORMAT;
	}

	public java.lang.String getReserved1() {
		return reserved1;
	}

	public void setReserved1(java.lang.String reserved1) {
		this.reserved1 = reserved1;
	}

	public java.lang.String getReserved2() {
		return reserved2;
	}

	public void setReserved2(java.lang.String reserved2) {
		this.reserved2 = reserved2;
	}

	public java.lang.String getReserved3() {
		return reserved3;
	}

	public void setReserved3(java.lang.String reserved3) {
		this.reserved3 = reserved3;
	}

	public static SimpleDateFormat getFormat() {
		return FORMAT;
	}

	/**
	 * Validate the properties that have been set from this HTTP request, and
	 * return an <code>ActionErrors</code> object that encapsulates any
	 * validation errors that have been found. If no errors are found, return
	 * <code>null</code> or an <code>ActionErrors</code> object with no
	 * recorded error messages.
	 * 
	 * @param mapping
	 *            The mapping used to select this instance
	 * @param request
	 *            The servlet request we are processing
	 */
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		ActionErrors errors = new ActionErrors();
		// test for nullity
		if (getCanceltaskGuid() == null) {
			errors.add("canceltaskGuid", new ActionError(
					"error.canceltaskGuid.required"));
		}
		// TODO test format/data
		return errors;
	}
}
